<%@page import="java.io.* , java.util.*, java.sql.*,  com.myapp.struts.dao.*, com.myapp.struts.beans.*"%>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<html:html lang="true">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title><bean:message key="welcome.title"/></title>
        <html:base/>
        <link href="../../../../css/cms.css" rel="stylesheet" type="text/css">
        <style type="text/css">
            <!--
            .style1 {
                color: #D3F1D5;
                font-weight: bold;
            }
            .style2 {color: #D3F1D5}
            -->
        </style>
    </head>
    <body>
        <table width="100%"  height="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td width="174" height="593" valign="top" bgcolor="#D3F1D5">
                    <table width="174" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td align="center" bgcolor="#115445" class="style6"><span class="style1">Creations</span></td>
                        </tr>
                        <tr>
                            <td align="center">
                                <%
          request.getSession(true);
          String role = session.getAttribute("role").toString();
          MenuDao gd = new MenuDao();
          Vector gp = gd.getItems(role, "IA");
          if (gp != null) {
              System.out.println("IN..................." + gp.size());
              Iterator itg = gp.iterator();
              while (itg.hasNext()) {
                  MenuBean gb = (MenuBean) itg.next();
                  String pname = gb.getPrivlageName();
                  String ppath = gb.getPrivlagePath();
                  System.out.println("pname=" + pname);
                  System.out.println("ppath=" + ppath);
                                %>
                                <a href="<%=ppath%>" target="items"><%=pname%></a><br>
                                <%
            }
        }
                                %></td>
                        </tr>
                        <tr>
                            <td align="center" bgcolor="#115445"><span class="style6 style2"><strong>Updates</strong></span></td>
                        </tr>
                        <tr>
                            <td align="center">
                                <%
        MenuDao gd1 = new MenuDao();
        Vector gp1 = gd1.getItems(role, "IU");
        if (gp1 != null) {
            System.out.println("IN..................." + gp.size());
            Iterator itg1 = gp1.iterator();
            while (itg1.hasNext()) {
                MenuBean gb1 = (MenuBean) itg1.next();
                String pname1 = gb1.getPrivlageName();
                String ppath1 = gb1.getPrivlagePath();
                System.out.println("pname1=" + pname1);
                System.out.println("ppath1=" + ppath1);
                                %>
                                <a href="<%=ppath1%>" class="navText" target="items"><%=pname1%></a><br>
                                <%
                  }
              }
                                %></td>
                        </tr>
                    </table>    </td>
                <td colspan="5" valign="top"><iframe width="100%" height="100%" name="items"></iframe></td>
            </tr>
        </table>
    </body>
</html:html>
